package com.uh.microservice.core.enums;

/**
 * @author fll
 * @data 2017/11/1
 */
public enum YesOrNoEnum {
    NO("0", "否"), YES("1", "是");
    public String key;
    public String value;

    private YesOrNoEnum(String key, String value) {
        this.key = key;
        this.value = value;
    }

    public static String getValue(String key) {
        YesOrNoEnum[] enums = YesOrNoEnum.values();
        for (YesOrNoEnum temp : enums) {
            if (temp.key.equals(key)) {
                return temp.value;
            }
        }
        return null;
    }
}
